home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / apps.to.go / DTS.Draw / DTS.Draw.make < prev    next >
Encoding:
Text File  |  1994-05-05  |  10.5 KB  |  272 lines  |  [TEXT/MPS ]

  1. #------------------------------------------------------------------------------
  2. #
  3. #    Apple Macintosh Developer Technical Support
  4. #
  5. #    MultiFinder-Aware Sample Application
  6. #
  7. #    Program:    DTS.Draw
  8. #    File:        DTS.Draw.make    -    Make Source
  9. #
  10. #    Copyright © 1988-1994 Apple Computer, Inc.
  11. #    All rights reserved.
  12. #
  13. #------------------------------------------------------------------------------
  14.  
  15. #    The are three possible ways of making DTS.Draw with this makefile
  16. #        1) 68K only
  17. #        2) PowerPC only
  18. #        3) "Fat" - both 68K and PowerPC
  19. #    You can control which gets build using the dependency line for "AppName"
  20. #    The default is to build the fat version.  See instructions below.
  21. AppName            =    'DTS.Draw'
  22. Signature        =    'DTSD'
  23.  
  24. DTS.Lib.folder    =    "::DTS.Lib:"
  25. DTS.Lib.hdrs    =    "::DTS.Lib:DTS.Lib.headers:"
  26. projsrc            =    :
  27. obj                =     :OBJECT:
  28. objppc            =     :OBJECTPPC:
  29.  
  30. #------------------------------------------------------------------------------
  31. # Options for our compilers:
  32. #    -sym on: tells the compilers and linker to emit symbol information for
  33. #        a source level debugger, such as SADE.
  34. #    -i {DTS.Lib.hdrs}: means to look for any #include files in the specified
  35. #        directory, as well as the normal set.
  36. #    -r: tells the C compiler to require function prototypes.
  37. #    -mbg off: tells the compilers to not emit low-level debugger names. This
  38. #        saves on file space, but you may wish to remove this option if you
  39. #        need to debug with something like Macsbug.
  40. #    -rd: for Rez means to suppress warnings for redeclared types (we redeclare
  41. #        'RECT' because it’s not included in MPW 3.0).
  42. #    -append: means to add the resources to the target file, rather than
  43. #        deleting all the ones that are there first.
  44. #    -d Signature...: is a way of passing our application's signature to Rez.
  45. #        With this mechanism, we can define our signature here, and export
  46. #        it to Rez, so that we don't have to declare it there, too.
  47. #    -sn STDCLIB=Main: puts all the routines that would normally go into the
  48. #        STDCLIB segment into the Main segment. This is done so that when we
  49. #        call upon any low-level utilities, we don't potentially move memory
  50. #        by loading in a segment.
  51. #------------------------------------------------------------------------------
  52.  
  53. #    SymOptions and OptOptions are mutually exclusive.  Enable as appropriate
  54. SymOptions        =    -sym on                # turn this on to debug with SADE/R2Db
  55. COptOptions        =    #-opt on
  56. PPCCOptOptions    =    #-opt speed
  57.  
  58. # CIncludesFolder needs to be set to your Universal Interfaces folder
  59. CIncludesFolder    =    -i "{PPCCIncludes}"
  60. IncludesFolders    =    -i {DTS.Lib.hdrs}
  61. COptions        =    {IncludesFolders} {CIncludesFolder} {SymOptions} {COptOptions} -r -mbg on
  62. PPCCOptions        =    {IncludesFolders} {SymOptions} {PPCCOptOptions} -w conformance -appleext on
  63. RezOptions        =    {IncludesFolders} -rd -append -d Signature="{Signature}" -d AppName='"DTS.Draw"'
  64. LinkOptions        =    {SymOptions} {SegmentMappings} -msg nodup
  65. LinkOptionsPPC    =    {SymOptions} -main main
  66. MakeSymOptions    =    -i {DTS.Lib.folder} -r
  67. #    The -w options for MakePef makes those libraries "weak" imports, meaning
  68. #        they can be absent at runtime.  The app must check before calling them.
  69. MakePefOptions    =        -l QuickTimeLib.xcoff=QuickTimeLib~ ∂
  70.                         -w QuickTimeLib:AddMovieResource ∂
  71.                         -w QuickTimeLib:ClearMovieChanged ∂
  72.                         -w QuickTimeLib:CloseMovieFile ∂
  73.                         -w QuickTimeLib:CreateMovieFile ∂
  74.                         -w QuickTimeLib:DisposeMovie ∂
  75.                         -w QuickTimeLib:EnterMovies ∂
  76.                         -w QuickTimeLib:GetMoviesError ∂
  77.                         -w QuickTimeLib:NewMovie ∂
  78.                         -w QuickTimeLib:NewMovieFromFile ∂
  79.                         -w QuickTimeLib:OpenMovieFile ∂
  80.                         -w QuickTimeLib:StandardGetFilePreview ∂
  81.                         -w QuickTimeLib:UpdateMovieResource ∂
  82.                         -l DragLib.xcoff=DragLib~ ∂
  83.                         -w DragLib:AddDragItemFlavor ∂
  84.                         -w DragLib:CountDragItems ∂
  85.                         -w DragLib:DisposeDrag ∂
  86.                         -w DragLib:GetDragAttributes ∂
  87.                         -w DragLib:GetDragItemReferenceNumber ∂
  88.                         -w DragLib:GetDragModifiers ∂
  89.                         -w DragLib:GetDragMouse ∂
  90.                         -w DragLib:GetDragOrigin ∂
  91.                         -w DragLib:GetDropLocation ∂
  92.                         -w DragLib:GetFlavorData ∂
  93.                         -w DragLib:GetFlavorDataSize ∂
  94.                         -w DragLib:GetFlavorFlags ∂
  95.                         -w DragLib:HideDragHilite ∂
  96.                         -w DragLib:InstallReceiveHandler ∂
  97.                         -w DragLib:InstallTrackingHandler ∂
  98.                         -w DragLib:NewDrag ∂
  99.                         -w DragLib:RemoveReceiveHandler ∂
  100.                         -w DragLib:RemoveTrackingHandler ∂
  101.                         -w DragLib:ShowDragHilite ∂
  102.                         -w DragLib:SetDragItemBounds ∂
  103.                         -w DragLib:TrackDrag ∂
  104.                         -l InterfaceLib.xcoff=InterfaceLib
  105. SegmentMappings    =    -sn INTENV=Main ∂
  106.                     -sn PASLIB=Main ∂
  107.                     -sn STDCLIB=Main ∂
  108.                     -sn SANELIB=Main ∂
  109.                     -sn StringUtils=Main ∂
  110.                     -sn UtilMain=Main
  111.  
  112. #------------------------------------------------------------------------------
  113. # These are modified default build rules.  This is necessary to take into
  114. # account differences between MPW 3.1 and 3.2
  115. #------------------------------------------------------------------------------
  116. {obj}            ƒ    {projsrc}
  117.  
  118. .c.o            ƒ    .c
  119.     {C} {COptions} {CAltOptions} {DepDir}{Default}.c -o {TargDir}{Default}.c.o
  120.  
  121. {objppc}        ƒ    {projsrc}
  122.  
  123. .o                ƒ    .c
  124.     PPCC {PPCCOptions} {DepDir}{Default}.c -o {TargDir}{Default}.o
  125.  
  126. #------------------------------------------------------------------------------
  127. # These are the objects that we want to link with. If any one of these
  128. # changes, then we invoke the Link command.
  129. #------------------------------------------------------------------------------
  130. AppObjects        =    ∂
  131.                     {obj}Clipboard.c.o ∂
  132.                     {obj}Colors.c.o ∂
  133.                     {obj}DoEvent.c.o ∂
  134.                     {obj}Drag.c.o ∂
  135.                     {obj}EventLoop.c.o ∂
  136.                     {obj}File.c.o ∂
  137.                     {obj}IdleTasks.c.o ∂
  138.                     {obj}Menu.c.o ∂
  139.                     {obj}PenSizeDialog.c.o ∂
  140.                     {obj}Start.c.o ∂
  141.                     {obj}TExtSelectObj.c.o ∂
  142.                     {obj}TGroupObj.c.o ∂
  143.                     {obj}TLineObj.c.o ∂
  144.                     {obj}ToolPalette.c.o ∂
  145.                     {obj}TOvalObj.c.o ∂
  146.                     {obj}TPieObj.c.o ∂
  147.                     {obj}TRectObj.c.o ∂
  148.                     {obj}TreeObj2.c.o ∂
  149.                     {obj}TRootObj.c.o ∂
  150.                     {obj}TRRectObj.c.o ∂
  151.                     {obj}Window.c.o ∂
  152.                     {obj}WindowDialog.c.o ∂
  153.                     {obj}WindowPalette.c.o
  154.  
  155. AppObjectsPPC    =    ∂
  156.                     {objppc}Clipboard.o ∂
  157.                     {objppc}Colors.o ∂
  158.                     {objppc}DoEvent.o ∂
  159.                     {objppc}Drag.o ∂
  160.                     {objppc}EventLoop.o ∂
  161.                     {objppc}File.o ∂
  162.                     {objppc}IdleTasks.o ∂
  163.                     {objppc}Menu.o ∂
  164.                     {objppc}PenSizeDialog.o ∂
  165.                     {objppc}Start.o ∂
  166.                     {objppc}TExtSelectObj.o ∂
  167.                     {objppc}TGroupObj.o ∂
  168.                     {objppc}TLineObj.o ∂
  169.                     {objppc}ToolPalette.o ∂
  170.                     {objppc}TOvalObj.o ∂
  171.                     {objppc}TPieObj.o ∂
  172.                     {objppc}TRectObj.o ∂
  173.                     {objppc}TreeObj2.o ∂
  174.                     {objppc}TRootObj.o ∂
  175.                     {objppc}TRRectObj.o ∂
  176.                     {objppc}Window.o ∂
  177.                     {objppc}WindowDialog.o ∂
  178.                     {objppc}WindowPalette.o
  179.  
  180. #------------------------------------------------------------------------------
  181. # These help define the libraries that we want to link with. {AppObjects} holds
  182. # the names of the application units we want to link together. {Libs68K} and
  183. # {LibsPPC} hold the DTS.Lib and System library files we need to link with.
  184. #------------------------------------------------------------------------------
  185. Libs68K            =    ∂
  186.                     "{Libraries}Runtime.o" ∂
  187.                     "{DTS.Lib.folder}DTS.Lib_controls" ∂
  188.                     "{DTS.Lib.folder}DTS.Lib_ctlhandler" ∂
  189.                     "{DTS.Lib.folder}DTS.Lib_framework" ∂
  190.                     "{DTS.Lib.folder}DTS.Lib_strings" ∂
  191.                     "{DTS.Lib.folder}DTS.Lib_treeobj" ∂
  192.                     "{DTS.Lib.folder}DTS.Lib_utils" ∂
  193.                     "{Libraries}Interface.o"
  194.  
  195. LibsPPC            =    ∂
  196.                     "{DTS.Lib.folder}DTS.Lib_controls.PPC" ∂
  197.                     "{DTS.Lib.folder}DTS.Lib_ctlhandler.PPC" ∂
  198.                     "{DTS.Lib.folder}DTS.Lib_framework.PPC" ∂
  199.                     "{DTS.Lib.folder}DTS.Lib_strings.PPC" ∂
  200.                     "{DTS.Lib.folder}DTS.Lib_treeobj.PPC" ∂
  201.                     "{DTS.Lib.folder}DTS.Lib_utils.PPC" ∂
  202.                     "{PPCLibraries}"QuickTimeLib.xcoff ∂
  203.                     "{PPCLibraries}"DragLib.xcoff ∂
  204.                     "{PPCLibraries}"InterfaceLib.xcoff ∂
  205.                     "{PPCLibraries}"PPCCRuntime.o
  206.  
  207.  
  208. #------------------------------------------------------------------------------
  209. # Dependencies for the individual components. These will invoke the
  210. # default build rules listed in Chapter 9 of the MPW 3.0 manual.
  211. # You may wish to reduce the number of dependencies.  Two dependencies
  212. # you may wish to remove are this makefile and the .protos file.
  213. # For the .protos file, if you add a function to the list of
  214. # functions in .protos, you will cause all the source files to be
  215. # recompiled.  This may be more than you want to wait for each time you
  216. # add a function to your application.  On the other hand, if you do not
  217. # include this in the dependencies, and you change the parameters for a
  218. # function, and make the respective change to .protos, any files
  219. # that reference that function will not be recompiled.  If these files are
  220. # recompiled, the prototype checking will catch any cases where you did
  221. # not change the way the altered function was called.  <<You choose>>
  222. #------------------------------------------------------------------------------
  223.  
  224. {AppObjects}    ƒ    #{AppName}.make ∂
  225. #                    App.h ∂
  226. #                    App.protos.h
  227.  
  228. #    This rule controls how the final app is built.
  229. #    By depending on both App68K and AppPPC, the "fat" version
  230. #    gets built.  To build 68K only or PowerPC only, remove the other
  231. #    dependency.
  232. {AppName}            ƒƒ AppRez App68K AppPPC
  233.     SetFile {AppName} -t APPL -c {Signature} -a B
  234.  
  235. #------------------------------------------------------------------------------
  236. # Build rule that links our application together. If any of our objects 
  237. # changes, or this makefile changes, then we relink.  The dummy prerequisite
  238. # ShellForce must come before any other prerequisites for {AppName}
  239. #------------------------------------------------------------------------------
  240.  
  241. App68K                ƒ {AppObjects}
  242.     Link {LinkOptions} -o {AppName} {AppObjects} {Libs68K}
  243.     Rez {RezOptions} AppCfrg.r -o {AppName}
  244.  
  245. #------------------------------------------------------------------------------
  246. # Build rule that creates our resources and adds them to the application
  247. #------------------------------------------------------------------------------
  248.  
  249. AppRez                ƒ    {AppName}.make ∂
  250.                         DTS.Draw.r ∂
  251.                         AppCfrg.r ∂
  252.                         App.h
  253.     Rez {RezOptions} DTS.Draw.r AppCfrg.r -o {AppName}
  254.  
  255. #------------------------------------------------------------------------------
  256. # Rules to build the PowerPC part
  257. #------------------------------------------------------------------------------
  258. AppPPC                ƒ    {AppName}.pef
  259.  
  260. {AppName}.xcoff        ƒ    {AppObjectsPPC}
  261.     PPCLink {LinkOptionsPPC} {AppObjectsPPC} {LibsPPC} -o {AppName}.xcoff
  262.  
  263. #    MakeSym is very timeconsuming, so we only do it if we really need it
  264. {AppName}.xSYM        ƒ {AppName}.xcoff
  265.     IF "{SymOptions}" != ""    && "{SymOptions}" != "-sym off"                
  266.         MakeSym {MakeSymOptions} {AppName}.xcoff -o {AppName}.xSYM
  267.     END
  268.  
  269. {AppName}.pef        ƒ    {AppName}.xcoff {AppName}.xSYM
  270.     MakePef {MakePefOptions} {AppName}.xcoff -o {AppName}
  271.     Rez {RezOptions} -d powerc AppCfrg.r -o {AppName}
  272.